﻿CREATE TYPE [dbo].[CharDataType1]
	FROM varchar(11) NOT NULL

GO

CREATE TYPE [dbo].[CharDataType2]
	FROM nvarchar(25) NOT NULL
GO

CREATE TYPE [dbo].[IntDataType2]
	FROM int NOT NULL

GO


CREATE TABLE [dbo].[TableWithUddts]
(
	[Id] IntDataType2 NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = 131072),
	[c1] CharDataType1 NOT NULL, 
	[c2] CharDataType2  COLLATE SQL_Latin1_General_CP1250_CS_AS NOT NULL, 
    INDEX [IX_TableWithUddts_Id] NONCLUSTERED HASH (Id) WITH (BUCKET_COUNT = 222272),
    INDEX [IX_TableWithUddts_C1] NONCLUSTERED HASH (c1) WITH (BUCKET_COUNT = 131072),
    INDEX [IX_TableWithUddts_C2] NONCLUSTERED HASH (c2) WITH (BUCKET_COUNT = 131072),
) WITH (MEMORY_OPTIMIZED = ON) 